<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@include file="../../common/operation_forbid.jsp" %>
<%@include file="../../common/jsVersion.jsp"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}"/>
<script type="text/javascript">
    var contextPath = '${contextPath}';
    var jypath = contextPath;
    var subscribeId='${subscribeId}';
    var oldSubId = '${oldSubId}';
    var documentType=${documentType};
    var processFlag='${processFlag}';
    var userName="${userName}";
    var procInstId= '${procInstId}';
    var businessStatus = '${businessStatus}';
    var busAutoStatus = '${busAutoStatus}';
    var busProcInstId = '${busProcInstId}';
    var auditStatus = '${auditStatus}';
    var projectId = "";
</script>
<!DOCTYPE html >
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>认购详情</title>
    <!-- neptune -->
    <%@include file="../../common/extInclude.jsp" %>
    <script type="text/javascript" src="${contextPath}/static/js/jquery/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="${contextPath}/static/js/marketing/abnorma/subscribeChangeRoomView.js?v=${jsVersion}"></script>
	<script type="text/javascript" src="${contextPath}/static/js/components/processHistory.js?v=${jsVersion}"></script>
	<script type="text/javascript" src="${contextPath}/static/js/components/processApproval.js?v=${jsVersion}"></script>
	<script type="text/javascript" src="${contextPath}/static/js/components/fileComponent.js?v=${jsVersion}"></script>
	<script type="text/javascript" src="${contextPath}/static/js/jquery/json2.js"></script> 
   
</head>
<script type="text/javascript">

function autoStatusCn(auditStatus){
		if(auditStatus == "0"){
			return "<font style='color: red;'>待提交</font>";
		}else if(auditStatus == "1"){
			return  "<font style='color: red;'>审核中</font>";
		}else if(auditStatus == "2"){
			return "<font style='color: red;'>已退回</font>";
		}else if(auditStatus == "3"){
			return "<font style='color: red;'>已通过</font>";
		}
	}

Ext.onReady(function() {
	var viewPanel=Ext.create("customer.subscribe.viewPanel");
 	var estateRecord=${estateRecord};
 	var customerRecord=${customerRecord}; 
 	var subscribeRecord=${subscribeRecord}; 
 	projectId = subscribeRecord.projectId;
	//初始化值
	viewPanel.getComponent("estatePanel").getForm().setValues(estateRecord);
 	viewPanel.getComponent("customerPanel").getForm().setValues(customerRecord);
 	viewPanel.getComponent("subscribeInfoForm").getForm().setValues(subscribeRecord); 
 	if(subscribeRecord.floorType=="1"){
 	  	Ext.getCmp('discountAfterPrice').setVisible(false);
 	}
 
 	
 	if(processFlag=="true" || processFlag==true){
 		Ext.getCmp("historyPanel").setVisible(false);
 	}  
});
</script>
<body>
</body>
</html>